import { parseTime } from "@/utils/ruoyi";

export function useColumns() {
  return [
    {
      type: "upload",
      prop: "imgUrl",
      label: "图片",
      listType: "picture-card",
      action: "/api/upload",
      dataType: "string",
      span: 24,
      rules: [
        {
          required: true,
          message: "请上传如片",
        },
      ],
    },
    // {
    //   span: 24,
    //   prop: "link",
    //   label: "跳转地址",
    // },
    {
      prop: "createTime",
      label: "创建时间",
      display: false,
      formatter: (row: any) => {
        return parseTime(row.createTime);
      },
    },
  ];
}
